Conditions | 2 |
Total Lines | 18 |
Code Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import Relation from "../Relation.js"; |
||
28 | |||
29 | protected setParentProperties() { |
||
30 | super.setParentProperties(); |
||
31 | |||
32 | let name = ''; |
||
33 | for (const namePart of this.$name.split('_')) { |
||
34 | name += namePart[0].toUpperCase() + namePart.slice(1); |
||
35 | } |
||
36 | |||
37 | Object.defineProperty(this.$parent, |
||
38 | `has${name}`, { |
||
39 | get: () => { |
||
40 | return this.value !== null; |
||
41 | }, |
||
42 | } |
||
43 | ) |
||
44 | |||
45 | return this; |
||
46 | } |
||
47 | } |